<div class="modal-header">
  <div class="modal-title">编辑 {{ record.id }} 信息</div>
</div>

<form nz-form #f="ngForm" se-container="1" (ngSubmit)="save(form)" labelWidth="100">
  <se label="名称">
    <input type="text" nz-input [(ngModel)]="form.name" name="name" required maxlength="32" />
  </se>
  <se label="交易类型">
    <nz-radio-group [(ngModel)]="form.transaction_type" nzButtonStyle="solid" name="type">
      <label nz-radio-button nzValue="expense"> <span>支出</span> </label>
      <label nz-radio-button nzValue="income"> <span>收入</span> </label>
    </nz-radio-group>
  </se>

  <se label="图标">
    <nz-radio-group [(ngModel)]="form.icon_name" name="icon_name" required>
      <label nz-radio [nzValue]="i" *ngFor="let i of icons"> <i nz-icon nzIconfont="icon-{{ i }}" class="icon-md"></i> </label>
    </nz-radio-group>
  </se>

  <se label="排序">
    <input type="number" nz-input [(ngModel)]="form.sort" name="sort" required />
  </se>
  <se col="1">
    <button nz-button nzType="primary" [disabled]="f.invalid">保存</button>
    <button nz-button type="button" (click)="close()">关闭</button>
  </se>
</form>
